﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows8Accelerator.Core.Xaml.Helpers;
using Windows8Accelerator.Core.Xaml.Html;

namespace Windows8Accelerator.Core.Xaml.Controls.RichText
{
    public abstract class RichTextFactoryBase
    {
        private static RichTextFactoryBase _Instance;
        public static RichTextFactoryBase Instance
        {
            get
            {
                if (_Instance == null)
                    _Instance = AssemblyHelper.CreateInstanceOfAccelerator<RichTextFactoryBase>();
                return _Instance;
            }
        }

        public abstract object NewLineBreak();

        public abstract void AddToParent(object Parent, object result, SuperHtmlNodeVisitor visitor);

        public abstract object NewRun(string text, SuperTextFormat TextFormat);

        public abstract object NewImage(string imageSrc, double? width, double? height);

        public abstract object NewListItem(int? orderCount, int indentLevel, out object newParent, SuperTextFormat textFormat);

        public abstract object NewUnderline();

        public abstract object NewA(string href, out object newParent, SuperTextFormat textFormat, Action<HyperlinkClickEventArgs> onHyperlinkClick);
    }
}
